//
//  YTLoadingView.h
//  YiTuUserClient
//
//  Created by 石少庸 on 2017/3/21.
//  Copyright © 2017年 YiTu. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, YTLodingViewAnimationType) {
    YTLodingViewAnimationTypeNineDots,
    YTLodingViewAnimationTypeTriplePulse,
    YTLodingViewAnimationTypeFiveDots,
    YTLodingViewAnimationTypeRotatingSquares,
    YTLodingViewAnimationTypeDoubleBounce,
    YTLodingViewAnimationTypeTwoDots,
    YTLodingViewAnimationTypeThreeDots,
    YTLodingViewAnimationTypeBallPulse,
    YTLodingViewAnimationTypeBallClipRotate,
    YTLodingViewAnimationTypeBallClipRotatePulse,
    YTLodingViewAnimationTypeBallClipRotateMultiple,
    YTLodingViewAnimationTypeBallRotate,
    YTLodingViewAnimationTypeBallZigZag,
    YTLodingViewAnimationTypeBallZigZagDeflect,
    YTLodingViewAnimationTypeBallTrianglePath,
    YTLodingViewAnimationTypeBallScale,
    YTLodingViewAnimationTypeLineScale,
    YTLodingViewAnimationTypeLineScaleParty,
    YTLodingViewAnimationTypeBallScaleMultiple,
    YTLodingViewAnimationTypeBallPulseSync,
    YTLodingViewAnimationTypeBallBeat,
    YTLodingViewAnimationTypeLineScalePulseOut,
    YTLodingViewAnimationTypeLineScalePulseOutRapid,
    YTLodingViewAnimationTypeBallScaleRipple,
    YTLodingViewAnimationTypeBallScaleRippleMultiple,
    YTLodingViewAnimationTypeTriangleSkewSpin,
    YTLodingViewAnimationTypeBallGridBeat,
    YTLodingViewAnimationTypeBallGridPulse,
    YTLodingViewAnimationTypeRotatingSandglass,
    YTLodingViewAnimationTypeRotatingTrigons,
    YTLodingViewAnimationTypeTripleRings,
    YTLodingViewAnimationTypeCookieTerminator, // 吃豆子
    YTLodingViewAnimationTypeBallSpinFadeLoader
};

@interface YTLoadingView : NSObject

/**
 直接显示
 */
+ (void)show;

/**
 显示loading动画, 默认是kMainColor(主题蓝)
 显示位置为屏幕中心

 @param type YTLodingViewAnimationType
 */
+ (void)showLoadingViewWithType:(YTLodingViewAnimationType)type;

/**
 显示loading动画, 可以根据自己的需求配置tintcolor
 显示位置为屏幕中心
 
 @param type YTLodingViewAnimationType
 @param color tint颜色
 */
+ (void)showLoadingViewWithType:(YTLodingViewAnimationType)type
                      tintColor:(UIColor *)color;

/**
 消失

 @param completion 回调
 */
+ (void)dismissCompletion:(void(^)())completion;

/**
 消失
 */
+ (void)dismiss;

@end
